﻿<ResourceDictionary
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:local="clr-namespace:Indigo.Quibbler.Common"
	>
	<!-- Resource dictionary entries should be defined here. -->
	
	<Style x:Key="QuibblerWindowStyle" TargetType="{x:Type local:QuibblerWindow}">
		<Setter Property="WindowStyle" Value="None"/>
		<Setter Property="AllowsTransparency" Value="True"/>
		<Setter Property="Template">
		<Setter.Value>
			<ControlTemplate TargetType="{x:Type Window}">
				<Border x:Name="template_windowBackground">
					<Border BorderThickness="2,0,2,2" CornerRadius="4" Margin="2,5,2,2">
						<Border.BorderBrush>
							<SolidColorBrush Color="#FF555B64"/>
						</Border.BorderBrush>
							<DockPanel>
								<Grid DockPanel.Dock="Top" HorizontalAlignment="Stretch">
									<Grid.Background>
										<ImageBrush ImageSource="pack://application:,,/Quibbler - Universal News Reader;component/Images/TitlebarBack.png"/>
									</Grid.Background>
									<Grid.ColumnDefinitions>
										<ColumnDefinition Width="*"/>
										<ColumnDefinition Width="100px"/>
									</Grid.ColumnDefinitions>
								
									<Border x:Name="template_titleBar" Background="Transparent" HorizontalAlignment="Stretch" Grid.Column="0">
										<StackPanel Orientation="Horizontal">
											<Image Source="{TemplateBinding Icon}" Width="16" Height="16" Margin="5,2,5,2"/>
											<Label Content="{TemplateBinding Title}" HorizontalAlignment="Left" VerticalAlignment="Center"
												 FontSize="12" FontFamily="/Quibbler - Universal News Reader;Component/Fonts/#Frutiger LT Std" Foreground="White" >
											</Label>
										</StackPanel>
									</Border>
									
									<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Grid.Column="1" Margin="5,2">
										<Viewbox Width="18" Height="18" Margin="2">
										<local:ImageButton x:Name="template_btnMinimize"
											ImageSource="pack://application:,,/Quibbler - Universal News Reader;component/Images/WindowMinimize.png"
											HoverImageSource="pack://application:,,/Quibbler - Universal News Reader;component/Images/WindowMinimize.png"/>
										</Viewbox>
										<Viewbox Width="18" Height="18" Margin="2">
	                                    <local:ImageButton x:Name="template_btnMaximize"
											ImageSource="pack://application:,,/Quibbler - Universal News Reader;component/Images/WindowCascade.png"
											HoverImageSource="pack://application:,,/Quibbler - Universal News Reader;component/Images/WindowCascade.png" />
										</Viewbox>
										<Viewbox Width="18" Height="18" Margin="2">
	                                    <local:ImageButton x:Name="template_btnClose"
											ImageSource="pack://application:,,/Quibbler - Universal News Reader;component/Images/WindowClose.png"
											HoverImageSource="pack://application:,,/Quibbler - Universal News Reader;component/Images/WindowClose.png" />
										</Viewbox>
									</StackPanel>
								</Grid>
								<Grid Background="White">
									<AdornerDecorator DockPanel.Dock="Bottom" VerticalAlignment="Stretch">
						              <ContentPresenter/>
						            </AdornerDecorator>
									<ResizeGrip x:Name="template_windowResizer" Cursor="SizeNWSE"
										HorizontalAlignment="Right" VerticalAlignment="Bottom"
										Width="20" Height="20"
									/>
								</Grid>
							</DockPanel>
					</Border>
				</Border>
			</ControlTemplate>
		</Setter.Value>
		</Setter>
	</Style>
</ResourceDictionary>